import request from '@/utils/request'

export const login = (data) => {
  return request({
    method: 'POST',
    url: '/user/login',
    data
  })
}

export const register = (data) => {
  return request({
    method: 'POST',
    url: '/user/registered',
    data
  })
}

// 获取用户信息
// export const getUserInfo = (authorization) => {
//   return request({
//     method: 'GET',
//     url: '/user',
//     params: {
//       authorization
//     }
//   })
// }
// 获取用户信息
export const getUserInfo = () => {
  return request('/user')
}
